package com.geek.exposed

import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.sql.Slf4jSqlDebugLogger
import org.jetbrains.exposed.sql.addLogger
import org.jetbrains.exposed.sql.transactions.transaction

fun main() {
    val database: Database? = Database.connect(
        url = "jdbc:mysql://localhost:3306/coffee?useUnicode=true&useSSL=false&serverTimezone=GMT%2B8",
        driver = "com.mysql.cj.jdbc.Driver",
        user = "root",
        password = "root"
    )

    transaction(database) {
        addLogger(Slf4jSqlDebugLogger)
    }
}
